﻿using AutoMapper;
using BCDto.Trading.SaleGoods.SaleGoods;
using BCDto.Trading.SaleGoods.SaleGoodsCategory;
using BCDto.Trading.SaleGoods.SaleGoodsNorm;
using BCEntity.Trading.SaleGoods.SaleGoods;
using BCEntity.Trading.SaleGoods.SaleGoodsCategory;
using BCEntity.Trading.SaleGoods.SaleGoodsNorm;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.MapperProfiles.Trading.SaleGoods
{
    public class SaleGoodsProfile : Profile
    {
        public SaleGoodsProfile()
        {

            //销售商品分类
            CreateMap<SaleGoodsCategoryDto, SaleGoodsCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsCategoryRequestDto, SaleGoodsCategoryPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsCategoryRequestDto, SaleGoodsCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsCategoryPutDto, SaleGoodsCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsCategoryEntity, SaleGoodsCategoryDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //销售商品
            CreateMap<SaleGoodsDto, SaleGoodsEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsRequestDto, SaleGoodsPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsRequestDto, SaleGoodsEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsPutDto, SaleGoodsEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsEntity, SaleGoodsDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsEntity, SaleGoodsViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //销售商品规格
            CreateMap<SaleGoodsNormDto, SaleGoodsNormEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsNormRequestDto, SaleGoodsNormPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsNormRequestDto, SaleGoodsNormEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsNormPutDto, SaleGoodsNormEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsNormEntity, SaleGoodsNormDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SaleGoodsNormEntity, SaleGoodsNormViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
